{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}\\file\UsersW$\wrr15\Home\My Documents\My Files\ANDY KIM\REVISION FOR WORLD DEVELOPMENT\DATA AND CODE\Part3.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}14 Jul 2016, 09:00:58
{txt}
{com}. 
. 
. //CONVERTING TSTATS TO PARTICAL CORRELATION COEFFICIENTS, r
. gen eff = sqrt(tstat^2/(tstat^2+df))
{txt}
{com}. gen r = eff if positive == 1
{txt}(32 missing values generated)

{com}. replace r = -1*eff if r == .
{txt}(32 real changes made)

{com}. gen varR = (1-r^2)/df
{txt}
{com}. gen seR = sqrt(varR)
{txt}
{com}. gen pcc = r
{txt}
{com}. 
. 
. // RECODING VARIABLES
. // The first thing we do is generate some new variables
. // because some of our old study characteristics had too few
. // observations
. gen endog = (tsls == 1 | gmm == 1)
{txt}
{com}. gen se_notols = (se_het == 1 | se_other == 1)
{txt}
{com}. gen fdigdp = fditype0
{txt}
{com}. 
. 
. *--------------------------------------------------------------------------------*
. *   TABLE 6:  Predicted PCC values                                               *
. *--------------------------------------------------------------------------------*
. 
. // FIXED EFFECTS
. gen pubyearr = pubyear/seR 
{txt}
{com}. gen datayearr = datayear/seR 
{txt}
{com}. gen spann = span/seR 
{txt}
{com}. gen subsett = subset/seR 
{txt}
{com}. gen fdigdpp = fdigdp/seR
{txt}
{com}. gen initiall = initial/seR
{txt}
{com}. gen endogg = endog/seR
{txt}
{com}. gen se_notolss = se_notols/seR
{txt}
{com}. gen dvtype11 = dvtype1/seR 
{txt}
{com}. gen dvtype22 = dvtype2/seR 
{txt}
{com}. gen dvtype_otherr = dvtype_other/seR 
{txt}
{com}. gen panel_nofee = panel_nofe/seR 
{txt}
{com}. gen panel_fee = panel_fe/ seR 
{txt}
{com}. gen tss = ts/seR   
{txt}
{com}. gen cjournall = cjournal/seR 
{txt}
{com}. gen notjournall = notjournal/seR 
{txt}
{com}. gen conss = 1/seR
{txt}
{com}. gen journalrankk = journalrank/seR
{txt}
{com}. gen fetstatR = r/seR 
{txt}
{com}. gen ones = 1
{txt}
{com}. 
. set obs 281
{txt}{p}
number of observations (_N)  was 280,
now 281
{p_end}

{com}. 
. // These are the parameter values for the "preferred model"
. replace pubyearr = 2010 in 281
{txt}(1 real change made)

{com}. replace datayearr = 1997.5 in 281
{txt}(1 real change made)

{com}. replace spann = 25 in 281
{txt}(1 real change made)

{com}. replace subsett = 0 in 281
{txt}(1 real change made)

{com}. replace fdigdpp = 1 in 281
{txt}(1 real change made)

{com}. replace initiall = 1 in 281
{txt}(1 real change made)

{com}. replace endogg = 1 in 281
{txt}(1 real change made)

{com}. replace se_notolss = 1 in 281
{txt}(1 real change made)

{com}. replace dvtype11 = 0 in 281
{txt}(1 real change made)

{com}. replace dvtype22 = 1 in 281
{txt}(1 real change made)

{com}. replace dvtype_otherr = 0 in 281
{txt}(1 real change made)

{com}. replace panel_nofee = 0 in 281
{txt}(1 real change made)

{com}. replace panel_fee = 1 in 281
{txt}(1 real change made)

{com}. replace tss = 0 in 281
{txt}(1 real change made)

{com}. replace cjournall = 0 in 281
{txt}(1 real change made)

{com}. replace notjournall = 0 in 281
{txt}(1 real change made)

{com}. replace journalrankk = 1 in 281
{txt}(1 real change made)

{com}. replace conss = 1 in 281
{txt}(1 real change made)

{com}. replace ones = 0 in 281
{txt}(1 real change made)

{com}. 
. gen yfew1 = . 
{txt}(281 missing values generated)

{com}. gen sefew1 = . 
{txt}(281 missing values generated)

{com}. gen yfew2 = . 
{txt}(281 missing values generated)

{com}. gen sefew2 = .
{txt}(281 missing values generated)

{com}. 
. 
. // This section calculates predicted values for the two FE equations
. 
. // FIXED EFFECTS
. 
. 
. //Calculating predicted PCC for the prefereed specification
. //This regression gives equal weight to each estimate
. quietly reg fetstatR pubyearr datayearr spann subsett fdigdpp initiall endogg ///
> se_notolss dvtype11 dvtype22 dvtype_otherr panel_nofee panel_fee tss ///
> cjournall notjournall journalrankk conss ones in 1/280,  noc vce(cluster id)
{txt}
{com}.  
. predict yfew11 in 281, xb 
{txt}(280 missing values generated)

{com}. predict sefew11 in 281, stdp
{txt}(280 missing values generated)

{com}. replace yfew1 = yfew11 in 281
{txt}(1 real change made)

{com}. replace sefew1 = sefew11 in 281
{txt}(1 real change made)

{com}. 
. //Calculating predicted PCC for the prefereed specification
. //This regression gives equal weight to each study
. quietly reg fetstatR pubyearr datayearr spann subsett fdigdpp initiall endogg ///
> se_notolss dvtype11 dvtype22 dvtype_otherr panel_nofee panel_fee tss ///
> cjournall notjournall journalrankk conss ones [pweight = weight] in 1/280, noc vce(cluster id)
{txt}
{com}. 
. predict yfew22 in 281, xb 
{txt}(280 missing values generated)

{com}. predict sefew22 in 281, stdp
{txt}(280 missing values generated)

{com}. replace yfew2 = yfew22 in 281
{txt}(1 real change made)

{com}. replace sefew2 = sefew22 in 281
{txt}(1 real change made)

{com}. 
. // This section calculates lower and upper bounds for a 2 sd confidence interval
. 
. gen lbfew1 = yfew1 - 2*sefew1 in 281
{txt}(280 missing values generated)

{com}. gen ubfew1 = yfew1 + 2*sefew1 in 281
{txt}(280 missing values generated)

{com}. 
. gen lbfew2 = yfew2 - 2*sefew2 in 281
{txt}(280 missing values generated)

{com}. gen ubfew2 = yfew2 + 2*sefew2 in 281
{txt}(280 missing values generated)

{com}. 
. 
. // RANDOM EFFECTS
. 
. metareg r pubyear datayear span subset fdigdp initial endog ///
> se_notols dvtype1 dvtype2 dvtype_other panel_nofe panel_fe ts ///
> cjournal notjournal journalrank in 1/280, wsse(seR)

{txt}Meta-regression{col 55}Number of obs{col 70}= {res}    280
REML{txt} estimate of between-study variance{col 55}tau2{col 70}={res}  .01732
{txt}% residual variation due to heterogeneity{col 55}I-squared_res{col 70}= {res} 78.37%
{txt}Proportion of between-study variance explained{col 55}Adj R-squared {col 70}= {res} 44.72%
{txt}Joint test for all covariates{col 55}Model F({res}17{txt},{res}262{txt}){col 70}= {res}  10.71
With{txt} Knapp-Hartung modification{col 55}Prob > F{col 70}= {res} 0.0000
{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}           r{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}pubyear {c |}{col 14}{res}{space 2}-.0161342{col 26}{space 2} .0064403{col 37}{space 1}   -2.51{col 46}{space 3}0.013{col 54}{space 4}-.0288154{col 67}{space 3}-.0034529
{txt}{space 4}datayear {c |}{col 14}{res}{space 2} .0043885{col 26}{space 2}  .006062{col 37}{space 1}    0.72{col 46}{space 3}0.470{col 54}{space 4}-.0075479{col 67}{space 3} .0163248
{txt}{space 8}span {c |}{col 14}{res}{space 2}-.0029624{col 26}{space 2} .0031266{col 37}{space 1}   -0.95{col 46}{space 3}0.344{col 54}{space 4}-.0091189{col 67}{space 3}  .003194
{txt}{space 6}subset {c |}{col 14}{res}{space 2} .0664005{col 26}{space 2}  .025403{col 37}{space 1}    2.61{col 46}{space 3}0.009{col 54}{space 4} .0163805{col 67}{space 3} .1164204
{txt}{space 6}fdigdp {c |}{col 14}{res}{space 2}-.0524102{col 26}{space 2} .0247596{col 37}{space 1}   -2.12{col 46}{space 3}0.035{col 54}{space 4}-.1011634{col 67}{space 3}-.0036571
{txt}{space 5}initial {c |}{col 14}{res}{space 2}-.1974609{col 26}{space 2}  .034935{col 37}{space 1}   -5.65{col 46}{space 3}0.000{col 54}{space 4}-.2662501{col 67}{space 3}-.1286718
{txt}{space 7}endog {c |}{col 14}{res}{space 2}  .019322{col 26}{space 2} .0301433{col 37}{space 1}    0.64{col 46}{space 3}0.522{col 54}{space 4}-.0400319{col 67}{space 3} .0786759
{txt}{space 3}se_notols {c |}{col 14}{res}{space 2}-.0403374{col 26}{space 2} .0256509{col 37}{space 1}   -1.57{col 46}{space 3}0.117{col 54}{space 4}-.0908455{col 67}{space 3} .0101708
{txt}{space 5}dvtype1 {c |}{col 14}{res}{space 2}  -.05528{col 26}{space 2} .0460612{col 37}{space 1}   -1.20{col 46}{space 3}0.231{col 54}{space 4}-.1459772{col 67}{space 3} .0354172
{txt}{space 5}dvtype2 {c |}{col 14}{res}{space 2} .1792798{col 26}{space 2}  .047693{col 37}{space 1}    3.76{col 46}{space 3}0.000{col 54}{space 4} .0853695{col 67}{space 3} .2731902
{txt}dvtype_other {c |}{col 14}{res}{space 2} .0152774{col 26}{space 2} .0657769{col 37}{space 1}    0.23{col 46}{space 3}0.817{col 54}{space 4}-.1142412{col 67}{space 3}  .144796
{txt}{space 2}panel_nofe {c |}{col 14}{res}{space 2}-.1383185{col 26}{space 2} .0370485{col 37}{space 1}   -3.73{col 46}{space 3}0.000{col 54}{space 4}-.2112691{col 67}{space 3}-.0653678
{txt}{space 4}panel_fe {c |}{col 14}{res}{space 2}-.1974748{col 26}{space 2} .0329882{col 37}{space 1}   -5.99{col 46}{space 3}0.000{col 54}{space 4}-.2624306{col 67}{space 3} -.132519
{txt}{space 10}ts {c |}{col 14}{res}{space 2}-.0140914{col 26}{space 2}  .013005{col 37}{space 1}   -1.08{col 46}{space 3}0.280{col 54}{space 4} -.039699{col 67}{space 3} .0115162
{txt}{space 4}cjournal {c |}{col 14}{res}{space 2}-.1004842{col 26}{space 2} .0464886{col 37}{space 1}   -2.16{col 46}{space 3}0.032{col 54}{space 4} -.192023{col 67}{space 3}-.0089454
{txt}{space 2}notjournal {c |}{col 14}{res}{space 2}-.0033315{col 26}{space 2} .0425902{col 37}{space 1}   -0.08{col 46}{space 3}0.938{col 54}{space 4}-.0871942{col 67}{space 3} .0805311
{txt}{space 1}journalrank {c |}{col 14}{res}{space 2}-.0069247{col 26}{space 2} .0542557{col 37}{space 1}   -0.13{col 46}{space 3}0.899{col 54}{space 4}-.1137574{col 67}{space 3} .0999081
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 24.08077{col 26}{space 2} 8.075502{col 37}{space 1}    2.98{col 46}{space 3}0.003{col 54}{space 4}  8.17962{col 67}{space 3} 39.98191
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. scalar tau2 = e(tau2)
{txt}
{com}. display tau2
{res}.01731573
{txt}
{com}. gen revarR= varR + tau2
{txt}(1 missing value generated)

{com}. gen reseR = sqrt(revarR)
{txt}(1 missing value generated)

{com}. 
. replace pubyearr = pubyear/reseR 
{txt}(281 real changes made, 1 to missing)

{com}. replace datayearr = datayear/reseR 
{txt}(281 real changes made, 1 to missing)

{com}. replace spann = span/reseR 
{txt}(281 real changes made, 1 to missing)

{com}. replace subsett = subset/reseR 
{txt}(103 real changes made, 1 to missing)

{com}. replace fdigdpp = fdigdp/reseR
{txt}(191 real changes made, 1 to missing)

{com}. replace initiall = initial/reseR
{txt}(172 real changes made, 1 to missing)

{com}. replace endogg = endog/reseR
{txt}(63 real changes made, 1 to missing)

{com}. replace se_notolss = se_notols/reseR
{txt}(108 real changes made, 1 to missing)

{com}. replace dvtype11 = dvtype1/reseR 
{txt}(60 real changes made, 1 to missing)

{com}. replace dvtype22 = dvtype2/reseR 
{txt}(167 real changes made, 1 to missing)

{com}. replace dvtype_otherr = dvtype_other/reseR 
{txt}(21 real changes made, 1 to missing)

{com}. replace panel_nofee = panel_nofe/reseR 
{txt}(67 real changes made, 1 to missing)

{com}. replace panel_fee = panel_fe/ reseR 
{txt}(138 real changes made, 1 to missing)

{com}. replace tss = ts/reseR   
{txt}(18 real changes made, 1 to missing)

{com}. replace cjournall = cjournal/reseR 
{txt}(54 real changes made, 1 to missing)

{com}. replace notjournall = notjournal/reseR 
{txt}(112 real changes made, 1 to missing)

{com}. replace journalrankk = journalrank/reseR
{txt}(108 real changes made, 1 to missing)

{com}. replace conss = 1/reseR
{txt}(281 real changes made, 1 to missing)

{com}. gen retstatR = r/reseR 
{txt}(1 missing value generated)

{com}. 
. // These are the parameter values for the "preferred model"
. replace pubyearr = 2010 in 281
{txt}(1 real change made)

{com}. replace datayearr = 1997.5 in 281
{txt}(1 real change made)

{com}. replace spann = 25 in 281
{txt}(1 real change made)

{com}. replace subsett = 0 in 281
{txt}(1 real change made)

{com}. replace fdigdpp = 1 in 281
{txt}(1 real change made)

{com}. replace initiall = 1 in 281
{txt}(1 real change made)

{com}. replace endogg = 1 in 281
{txt}(1 real change made)

{com}. replace se_notolss = 1 in 281
{txt}(1 real change made)

{com}. replace dvtype11 = 0 in 281
{txt}(1 real change made)

{com}. replace dvtype22 = 1 in 281
{txt}(1 real change made)

{com}. replace dvtype_otherr = 0 in 281
{txt}(1 real change made)

{com}. replace panel_nofee = 0 in 281
{txt}(1 real change made)

{com}. replace panel_fee = 1 in 281
{txt}(1 real change made)

{com}. replace tss = 0 in 281
{txt}(1 real change made)

{com}. replace cjournall = 0 in 281
{txt}(1 real change made)

{com}. replace notjournall = 0 in 281
{txt}(1 real change made)

{com}. replace journalrankk = 1 in 281
{txt}(1 real change made)

{com}. replace conss = 1 in 281
{txt}(1 real change made)

{com}. gen yrew1 = . 
{txt}(281 missing values generated)

{com}. gen serew1 = . 
{txt}(281 missing values generated)

{com}. gen yrew2 = . 
{txt}(281 missing values generated)

{com}. gen serew2 = .
{txt}(281 missing values generated)

{com}. 
. 
. // This section calculates predicted values for the two RE equations
. 
. // RANDOM EFFECTS
. 
. //Calculating predicted PCC for the prefereed specification
. //This regression gives equal weight to each estimate
. quietly reg retstatR pubyearr datayearr spann subsett fdigdpp initiall endogg ///
> se_notolss dvtype11 dvtype22 dvtype_otherr panel_nofee panel_fee tss ///
> cjournall notjournall journalrankk conss ones in 1/280, noc vce(cluster id)
{txt}
{com}.  
. predict yrew11 in 281, xb 
{txt}(280 missing values generated)

{com}. predict serew11 in 281, stdp
{txt}(280 missing values generated)

{com}. replace yrew1 = yrew11 in 281
{txt}(1 real change made)

{com}. replace serew1 = serew11 in 281
{txt}(1 real change made)

{com}. 
. //Calculating predicted PCC for the prefereed specification
. //This regression gives equal weight to each study
. quietly reg retstatR pubyearr datayearr spann subsett fdigdpp initiall endogg ///
> se_notolss dvtype11 dvtype22 dvtype_otherr panel_nofee panel_fee tss ///
> cjournall notjournall journalrankk conss ones [pweight = weight] in 1/280, noc  vce(cluster id)
{txt}
{com}. 
. predict yrew22 in 281, xb 
{txt}(280 missing values generated)

{com}. predict serew22 in 281, stdp
{txt}(280 missing values generated)

{com}. replace yrew2 = yrew22 in 281
{txt}(1 real change made)

{com}. replace serew2 = serew22 in 281
{txt}(1 real change made)

{com}. 
. // This section calculates lower and upper bounds for a 2 sd confidence interval
. 
. gen lbrew1 = yrew1 - 2*serew1 in 281
{txt}(280 missing values generated)

{com}. gen ubrew1 = yrew1 + 2*serew1 in 281
{txt}(280 missing values generated)

{com}. 
. gen lbrew2 = yrew2 - 2*serew2 in 281
{txt}(280 missing values generated)

{com}. gen ubrew2 = yrew2 + 2*serew2 in 281
{txt}(280 missing values generated)

{com}. 
. // This section print out the results
. 
. list yfew1 lbfew1 ubfew1 in 281
{txt}
     {c TLC}{hline 12}{c -}{hline 12}{c -}{hline 11}{c TRC}
     {c |} {res}     yfew1       lbfew1      ubfew1 {txt}{c |}
     {c LT}{hline 12}{c -}{hline 12}{c -}{hline 11}{c RT}
281. {c |} {res}-.01100402   -.11064507   .08863704 {txt}{c |}
     {c BLC}{hline 12}{c -}{hline 12}{c -}{hline 11}{c BRC}

{com}. list yfew2 lbfew2 ubfew2 in 281
{txt}
     {c TLC}{hline 11}{c -}{hline 12}{c -}{hline 11}{c TRC}
     {c |} {res}    yfew2       lbfew2      ubfew2 {txt}{c |}
     {c LT}{hline 11}{c -}{hline 12}{c -}{hline 11}{c RT}
281. {c |} {res}.03531627   -.11549917   .18613171 {txt}{c |}
     {c BLC}{hline 11}{c -}{hline 12}{c -}{hline 11}{c BRC}

{com}. list yrew1 lbrew1 ubrew1 in 281
{txt}
     {c TLC}{hline 12}{c -}{hline 12}{c -}{hline 11}{c TRC}
     {c |} {res}     yrew1       lbrew1      ubrew1 {txt}{c |}
     {c LT}{hline 12}{c -}{hline 12}{c -}{hline 11}{c RT}
281. {c |} {res}-.25287321   -.60369101   .09794458 {txt}{c |}
     {c BLC}{hline 12}{c -}{hline 12}{c -}{hline 11}{c BRC}

{com}. list yrew2 lbrew2 ubrew2 in 281
{txt}
     {c TLC}{hline 12}{c -}{hline 12}{c -}{hline 11}{c TRC}
     {c |} {res}     yrew2       lbrew2      ubrew2 {txt}{c |}
     {c LT}{hline 12}{c -}{hline 12}{c -}{hline 11}{c RT}
281. {c |} {res}-.03435138   -.40295918   .33425643 {txt}{c |}
     {c BLC}{hline 12}{c -}{hline 12}{c -}{hline 11}{c BRC}

{com}. 
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}\\file\UsersW$\wrr15\Home\My Documents\My Files\ANDY KIM\REVISION FOR WORLD DEVELOPMENT\DATA AND CODE\Part3.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}14 Jul 2016, 09:00:59
{txt}{.-}
{smcl}
{txt}{sf}{ul off}